/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

using NHibernate;
using BubzCommerce.CMS.Data.Base;

namespace BubzCommerce.CMS.Data.BusinessObjects
{
	/// <summary>
    /// Upload object for NHibernate mapped table 'upload'.
	/// </summary>
	[Serializable]
    public partial class Upload : BusinessBase<int>
	{
		#region Member Variables
		protected int _id;
		protected string _classname;
		protected string _name;
		protected string _title;
		protected string _filename;
		protected string _filecontent;
		protected int _sort;
		protected DateTime _created;
		protected DateTime _edited;
		protected Upload _uploadmember;
		#endregion
		#region Constructors
			
		public Upload() {}
					
		public Upload(int id, string classname, string name, string title, string filename, string filecontent, int sort, DateTime created, DateTime edited) 
		{
			this._id= id;
			this._classname= classname;
			this._name= name;
			this._title= title;
			this._filename= filename;
			this._filecontent= filecontent;
			this._sort= sort;
			this._created= created;
			this._edited= edited;
		}

		public Upload(int id, string classname)
		{
			this._id= id;
			this._classname= classname;
		}
		
		#endregion
		#region Public Properties
		public  virtual int Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual string ClassName
		{
			get { return _classname; }
			set {_classname= value; }
		}
		public  virtual string Name
		{
			get { return _name; }
			set {_name= value; }
		}
		public  virtual string Title
		{
			get { return _title; }
			set {_title= value; }
		}
		public  virtual string FileName
		{
			get { return _filename; }
			set {_filename= value; }
		}
		public  virtual string FileContent
		{
			get { return _filecontent; }
			set {_filecontent= value; }
		}
		public  virtual int Sort
		{
			get { return _sort; }
			set {_sort= value; }
		}
		public  virtual DateTime Created
		{
			get { return _created; }
			set {_created= value; }
		}
		public  virtual DateTime Edited
		{
			get { return _edited; }
			set {_edited= value; }
		}
        public virtual Upload UploadMember
		{
			get { return _uploadmember; }
			set {_uploadmember= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Upload castObj = (Upload)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
